<template>
    <div class="u-p-20">
        <el-card shadow="never">
            <div slot="header">
                <b class="u-f-16">
                    <span v-if="objForm.id">编辑</span>
                    <span v-else>添加</span>物流
                </b>
                <div class="u-right u-5mt">
                    <el-button type="success" size="small" icon="el-icon-document-checked" @click="submitForm('objForm')" v-if="hasPerm('logisticsEditPost')">提交保存</el-button>
                    <el-button size="small" icon="el-icon-back" @click="$router.go(-1)">返回</el-button>
                </div>
            </div>
            <el-form :model="objForm" :rules="rules" ref="objForm" label-width="100px" class="u-form">


                <el-form-item label="物流名称">
                    <el-input v-model="objForm.logistics_name" placeholder="物流名称"></el-input>
                </el-form-item>

                <el-form-item label="物流编码">
                    <el-input v-model="objForm.logistics_code" placeholder="物流编码"></el-input>
                </el-form-item>

            </el-form>
        </el-card>
    </div>
</template>

<script>
    import commonEdit from '@/mixins/common-edit'
    export default {
        mixins: [commonEdit],
        data() {
            return {
                apiName: 'logistics',
                backRoute: 'logisticsIndex', //成功跳转地址
                objForm: {
                    id:'',
                    logistics_name:"",
                    logistics_code:"",
                },
            }
        },
        methods: {

        },
        created() {
            if (this.$route.params.id) {
                this.objForm.id = this.$route.params.id
            }
        }

    }
</script>
